<template>
	<view class="container">
		<image class="activity-img" :src="vdata.activityDetail.activityImg"></image>
		<view class="title">{{ vdata.activityDetail.activityName }}</view>
		<view>活动时间：{{ dayjs(vdata.activityDetail.sTime).format('YYYY[年]M[月]D[日]') }}~{{ dayjs(vdata.activityDetail.eTime).format('YYYY[年]M[月]D[日]') }}</view>
		<view>活动类型：{{ vdata.activityDetail.activityTypeName }}</view>
		<view>机构号：{{ vdata.activityDetail.agentNo }}</view>
		<view>机构名称：{{ vdata.activityDetail.agentName }}</view>
		<view>
			<view style="position: absolute;">活动规则：</view>
			<view style="padding-left: 5em;">{{ vdata.activityDetail.remark }}</view>
		</view>
	</view>
</template>

<script setup>
	import dayjs from 'dayjs'
	import { onLoad } from '@dcloudio/uni-app'
	import { $activityDetail } from '@/http/marketing/apiMarketing.js'
	import { reactive, ref } from 'vue'

	const vdata = reactive({
		activityDetail: {}, // 活动详情数据
	})


	onLoad(({ info }) => {
		vdata.activityDetail = JSON.parse(info)
	})
</script>

<style lang="less">
	.container {
		width: 100%;
		padding: 32rpx;
		box-sizing: border-box;
		overflow: hidden;

		.activity-img {
			width: 100%;
			height: 372rpx;
			border-radius: 25rpx;

		}

		&>view {
			font-size: 24rpx;
			color: #999999;
			margin-bottom: 28rpx;
		}

		.title {
			margin: 36rpx 0;
			font-weight: 600;
			font-size: 38rpx;
			color: #333333;
		}
	}
</style>